<?
define('BASEPATH', true);
include('../inc/config.php');

if(isset($_POST['data'])){
	$x = $db->EscapeString($_POST['data']);
	$site = $db->FetchArray($db->Query("SELECT * FROM `surf` WHERE `id`='".$x."'"));
	
	if($site['id'] != "" && $x != "" && $site['confirm'] != 0){
		mysql_query("UPDATE `surf` SET `confirm`='0' WHERE `id`='".$site['id']."'");
		echo '<font size=2><b>Site confirmed with success!</b></font>';
	}else{
		echo '<font size=2><b>Site already confirmed!</b></font>';
	}
}
?>